package entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: Lương Xuân Huy
 * Date: 9/15/14
 * Time: 8:42 PM
 * Long Van Soft Solution Sjc.
 * To change this template use File | Settings | File and Code Templates
 */
@Entity
@Table(name = "MEMBER")
public class Member implements Serializable {
    private String memberId;
    private String username;
    private String password;
    private String status;   // Y/N
    private String role;     // null, member, admin
    private String avatar;
    private Date createTime;
    private Date updateTime;


    public Member() {
    }

    @Id
    @Column(name = "memberId", length = 20, nullable = false, insertable = true, updatable = true)
    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }


    @Column(name = "username", length = 255, nullable = false, insertable = true, updatable = true)
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Column(name = "password", length = 255, nullable = true, insertable = true, updatable = true)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column (name = "status", length = 255)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column (name = "role", length = 255)
    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }
}
